
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

#SET(RUNSCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/runCTP.sh.in")
set(CTPAPPNAME "CTPSymbol${PRO_VECTION}")
configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/runCTP.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/runSymbolObtainer${PRO_VECTION}.sh"
)

set(CTPAPPNAME "CTPTrade${PRO_VECTION}")
configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/runCTP.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/runMarketTrade${PRO_VECTION}.sh"
)

set(CTPAPPNAME "CTPMarketListen${PRO_VECTION}")
configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/runCTP.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/runMarketListen${PRO_VECTION}.sh"
)

configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/autoReboot.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/autoReboot.sh"
	COPYONLY
)

set(MarketListenAPPNAME "runMarketListen${PRO_VECTION}")
set(MarketTradeAPPNAME "runMarketTrade${PRO_VECTION}")
set(SymbolObtainerAPPNAME "runSymbolObtainer${PRO_VECTION}")
configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/shAutoStart.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/shAutoStart.sh"
)

set(RunApps "shAutoStart.sh autoReboot.sh ${MarketListenAPPNAME}.sh ${MarketTradeAPPNAME}.sh ${SymbolObtainerAPPNAME}.sh CTPSymbol${PRO_VECTION} CTPTrade${PRO_VECTION} CTPMarketListen${PRO_VECTION} TimeSegment")
configure_file (
    "${CMAKE_CURRENT_SOURCE_DIR}/Permissions.sh.in"
    "${EXECUTABLE_OUTPUT_PATH}/PermissionsSet.sh"
)

ADD_SUBDIRECTORY(Base)
ADD_SUBDIRECTORY(CTPSymbol)
ADD_SUBDIRECTORY(CTPTrade)
ADD_SUBDIRECTORY(MarketListen)
ADD_SUBDIRECTORY(StrategyBase)
ADD_SUBDIRECTORY(TimeSegment)
ADD_SUBDIRECTORY(TradeBase)